﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Group/1/ManagePage.Master"
    Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript" src="/Scripts/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="/fckeditor/fckeditor.js"></script>
    <div class="main_wrapper clear">
        <% using (Html.BeginForm("CreateGroupActivity", "Activity"))
           { %>
        <div class="mod_box">
            <div class="creat_event">
                <div class="title yahei">
                    <h2>
                        发起活动</h2>
                    <div class="more">
                        <a href="#">返回活动</a></div>
                </div>
                <div class="creat_event_form">
                    <div class="step">
                        <span class="current">1.填写活动信息</span><span> &gt; </span><span>2.活动海报及邀请</span><span>
                            &gt; </span><span>3.提交活动</span></div>
                    <div class="ctg clear">
                        <div class="cat_list">
                            <a href="javascript:void(0);" rel="LinkMotion" id="1">羽毛球</a> <a id="2" href="javascript:void(0);"
                                rel="LinkMotion">乒乓球</a> <a id="3" href="javascript:void(0);" rel="LinkMotion">台球</a>
                            <a id="4" href="javascript:void(0);" rel="LinkMotion">篮球</a> <a id="5" href="javascript:void(0);"
                                rel="LinkMotion">足球</a> <a id="6" href="javascript:void(0);">网球</a>
                        </div>
                        <div class="cat_list">
                            <a id="7" href="javascript:void(0);" rel="LinkMotion">健身</a> <a id="8" href="javascript:void(0);"
                                rel="LinkMotion">舞蹈</a> <a id="9" href="javascript:void(0);" rel="LinkMotion">骑行</a>
                            <a id="10" href="javascript:void(0);" rel="LinkMotion">跑步</a> <a id="11" href="javascript:void(0);"
                                rel="LinkMotion">登山/溯溪</a> <a id="12" href="javascript:void(0);" rel="LinkMotion">钓鱼</a>
                        </div>
                        <div class="cat_list">
                            <a id="13" href="javascript:void(0);" rel="LinkMotion">K歌</a> <a id="14" href="javascript:void(0);"
                                rel="LinkMotion">聚餐</a> <a id="15" href="javascript:void(0);" rel="LinkMotion">其它</a>
                        </div>
                        <%= Html.Hidden("HidSportId", 0)%>
                    </div>
                    <div class="event_title">
                        <span>活动标题：</span>
                        <input name="Title" type="text" />
                    </div>
                    <div class="event_time">
                        <div class="item clear">
                            <span class="icon time_icon"></span>
                            <div class="dropset">
                                <div class="selected the_first">
                                    <span id="SpanActiveMode">当天结束</span> <a href="javascript:void(0);" id="LinkActiveMode">
                                    </a>
                                </div>
                                <div class="select_list zone_select_list clear" style="display: none;" id="DivActiveMode">
                                    <a href="javascript:void(0);" onclick="SelectActiveMode('当天结束');">当天结束</a> <a href="javascript:void(0);"
                                        onclick="SelectActiveMode('连续多天');">连续多天</a> <a href="javascript:void(0);" onclick="SelectActiveMode('每周举行');">
                                            每周举行</a>
                                </div>
                                <%= Html.Hidden("ActiveMode", "当天结束")%>
                            </div>
                            <div class="dropset" id="DivActiveTime">
                                <div class="selected">
                                    <span class="note" id="SpanActivityTime">活动日期</span> <a href="javascript:void(0);"
                                        class="date_icon" onclick="WdatePicker({el:'SpanActivityTime'})"></a>
                                    <%= Html.Hidden("HidActivityTime", "")%>
                                </div>
                            </div>
                            <div id="DivStartAndEndTime" style="display: none">
                                <div class="dropset">
                                    <div class="selected">
                                        <span class="note" id="SpanStartDate">开始日期</span> <a href="javascript:void(0);" class="date_icon"
                                            onclick="WdatePicker({el:'SpanStartDate'})"></a>
                                    </div>
                                </div>
                                <div class="dropset">
                                    <div class="no_select">
                                        至</div>
                                </div>
                                <div class="dropset">
                                    <div class="selected">
                                        <span class="note" id="SpanEndDate">结束日期</span> <a href="javascript:void(0);" class="date_icon"
                                            onclick="WdatePicker({el:'SpanEndDate'})"></a>
                                    </div>
                                </div>
                                <%= Html.Hidden("HidStartDate")%>
                                <%= Html.Hidden("HidEndDate")%>
                            </div>
                            <div class="dropset" style="display: none" id="DivFrequency">
                                <div class="selected">
                                    <span class="note">活动频率</span> <a href="javascript:void(0);" id="LinkFrequency">
                                    </a>
                                </div>
                                <div class="select_list week_select_list clear" id="DivWeek">
                                    <span>
                                        <input name="Week" type="checkbox" value="1" />
                                        一</span> <span>
                                            <input name="Week" type="checkbox" value="2" />
                                            二</span> <span>
                                                <input name="Week" type="checkbox" value="3" />
                                                三</span> <span>
                                                    <input name="Week" type="checkbox" value="4" />
                                                    四</span> <span>
                                                        <input name="Week" type="checkbox" value="5" />
                                                        五</span> <span>
                                                            <input name="Week" type="checkbox" value="6" />
                                                            六</span> <span>
                                                                <input name="Week" type="checkbox" value="0" />
                                                                日</span>
                                </div>
                            </div>
                            <div class="dropset">
                                <div class="selected">
                                    <span class="note" id="SpanStartTime">开始时间</span> <a href="javascript:void(0);" id="LinkStartTime">
                                    </a>
                                </div>
                                <div class="select_list time_select_list clear" style="display: none;" id="DivStartTime">
                                </div>
                                <%= Html.Hidden("HidStartTime")%>
                            </div>
                            <div class="dropset">
                                <div class="no_select">
                                    至</div>
                            </div>
                            <div class="dropset">
                                <div class="selected">
                                    <span class="note" id="SpanEndTime">结束时间</span> <a href="javascript:void(0);" id="LinkEndTime">
                                    </a>
                                </div>
                                <div class="select_list time_select_list clear" style="display: none;" id="DivEndTime">
                                </div>
                                <%= Html.Hidden("HidEndTime")%>
                            </div>
                        </div>
                        <div class="item clear">
                            <span class="icon add_icon"></span>
                            <div class="dropset">
                                <div class="selected the_first">
                                    <span>厦门</span> <a href="javascript:void(0);" id="LinkCity"></a>
                                </div>
                                <div class="select_list city_select_list clear" id="DivCity" style="display: none;">
                                    <div class="hd">
                                        <a href="#" class="tab on">热门</a> <a href="#" class="tab">A - G</a> <a href="#" class="tab">
                                            H - L</a> <a href="#" class="tab">M - T</a> <a href="#" class="tab">W - Z</a>
                                    </div>
                                    <div class="bd">
                                        <span><a href="javascript:void(0);">北京</a></span> <span><a data-uid="shanghai" data-value="108296"
                                            href="javascipt:void(0)">上海</a></span> <span><a data-uid="guangzhou" data-value="118281"
                                                href="javascipt:void(0)">广州</a></span> <span><a data-uid="wuhan" data-value="118254"
                                                    href="javascipt:void(0)">武汉</a></span> <span><a data-uid="shenzhen" data-value="118282"
                                                        href="javascipt:void(0)">深圳</a></span> <span><a data-uid="chengdu" data-value="118318"
                                                            href="javascipt:void(0)">成都</a></span> <span><a data-uid="hangzhou" data-value="118172"
                                                                href="javascipt:void(0)">杭州</a></span> <span><a data-uid="nanjing" data-value="118159"
                                                                    href="javascipt:void(0)">南京</a></span> <span><a data-uid="xian" data-value="118371"
                                                                        href="javascipt:void(0)">西安</a></span> <span><a data-uid="chongqing" data-value="108309"
                                                                            href="javascipt:void(0)">重庆</a></span> <span><a data-uid="zhengzhou" data-value="118237"
                                                                                href="javascipt:void(0)">郑州</a></span> <span><a data-uid="changsha" data-value="118267"
                                                                                    href="javascipt:void(0)">长沙</a></span>
                                        <span><a data-uid="tianjin" data-value="108289" href="javascipt:void(0)">天津</a></span>
                                        <span><a data-uid="suzhou" data-value="118163" href="javascipt:void(0)">苏州</a></span>
                                        <span><a data-uid="fuzhou" data-value="118200" href="javascipt:void(0)">福州</a></span>
                                        <span><a data-uid="shenyang" data-value="118123" href="javascipt:void(0)">沈阳</a></span>
                                        <span><a data-uid="wenzhou" data-value="118174" href="javascipt:void(0)">温州</a></span>
                                        <span><a data-uid="haerbin" data-value="118146" href="javascipt:void(0)">哈尔滨</a></span>
                                        <span><a data-uid="qingdao" data-value="118221" href="javascipt:void(0)">青岛</a></span>
                                        <span><a data-uid="jinan" data-value="118220" href="javascipt:void(0)">济南</a></span>
                                        <span><a data-uid="xiamen" data-value="118201" href="javascipt:void(0)">厦门</a></span>
                                        <span><a data-uid="dalian" data-value="118124" href="javascipt:void(0)">大连</a></span>
                                        <span><a data-uid="hefei" data-value="118183" href="javascipt:void(0)">合肥</a></span>
                                        <span><a data-uid="changchun" data-value="118137" href="javascipt:void(0)">长春</a></span>
                                        <span><a data-uid="ningbo" data-value="118173" href="javascipt:void(0)">宁波</a></span>
                                        <span><a data-uid="shijiazhuang" data-value="118088" href="javascipt:void(0)">石家庄</a></span>
                                        <span><a data-uid="kunming" data-value="118348" href="javascipt:void(0)">昆明</a></span>
                                        <span><a data-uid="wuxi" data-value="118160" href="javascipt:void(0)">无锡</a></span>
                                        <span><a data-uid="nanchang" data-value="118209" href="javascipt:void(0)">南昌</a></span>
                                        <span><a data-uid="nanning" data-value="118302" href="javascipt:void(0)">南宁</a></span>
                                        <dl class="mod">
                                            <dt>A</dt>
                                            <dd>
                                                <span><a data-uid="dalian" data-value="118124" href="javascipt:void(0)">大连</a></span>
                                                <span><a data-uid="hefei" data-value="118183" href="javascipt:void(0)">合肥</a></span>
                                                <span><a data-uid="changchun" data-value="118137" href="javascipt:void(0)">长春</a></span>
                                                <span><a data-uid="ningbo" data-value="118173" href="javascipt:void(0)">宁波</a></span>
                                                <span><a data-uid="shijiazhuang" data-value="118088" href="javascipt:void(0)">石家庄</a></span>
                                                <span><a data-uid="kunming" data-value="118348" href="javascipt:void(0)">昆明</a></span>
                                                <span><a data-uid="wuxi" data-value="118160" href="javascipt:void(0)">无锡</a></span>
                                                <span><a data-uid="nanchang" data-value="118209" href="javascipt:void(0)">南昌</a></span>
                                                <span><a data-uid="nanning" data-value="118302" href="javascipt:void(0)">南宁</a></span>
                                            </dd>
                                        </dl>
                                        <dl class="mod">
                                            <dt>B</dt>
                                            <dd>
                                                <span><a data-uid="dalian" data-value="118124" href="javascipt:void(0)">大连</a></span>
                                                <span><a data-uid="hefei" data-value="118183" href="javascipt:void(0)">合肥</a></span>
                                                <span><a data-uid="changchun" data-value="118137" href="javascipt:void(0)">长春</a></span>
                                                <span><a data-uid="ningbo" data-value="118173" href="javascipt:void(0)">宁波</a></span>
                                                <span><a data-uid="shijiazhuang" data-value="118088" href="javascipt:void(0)">石家庄</a></span>
                                                <span><a data-uid="kunming" data-value="118348" href="javascipt:void(0)">昆明</a></span>
                                                <span><a data-uid="wuxi" data-value="118160" href="javascipt:void(0)">无锡</a></span>
                                                <span><a data-uid="nanchang" data-value="118209" href="javascipt:void(0)">南昌</a></span>
                                                <span><a data-uid="nanning" data-value="118302" href="javascipt:void(0)">南宁</a></span>
                                            </dd>
                                        </dl>
                                    </div>
                                </div>
                            </div>
                            <div class="dropset">
                                <div class="selected">
                                    <span class="note">选择城区</span> <a href="#"></a>
                                </div>
                                <div class="select_list zone_select_list clear" style="display: none;">
                                    <a href="#">思明区</a> <a href="#">湖里区</a> <a href="#">海沧区</a> <a href="#">同安区</a>
                                    <a href="#">翔安区</a>
                                </div>
                            </div>
                            <div class="dropset">
                                <div class="no_select input_in">
                                    <input class="add_input no_input" name="Address" type="text" value="详细地址" /></div>
                            </div>
                        </div>
                        <div class="item end_item clear">
                            <span class="icon pay_icon"></span>
                            <div class="dropset">
                                <div class="selected the_first">
                                    <span id="SpanPay">收费方式</span> <a href="javascript:void(0);" id="LinkPay"></a>
                                </div>
                                <div class="select_list zone_select_list clear" style="display: none;" id="DivPay">
                                    <a href="javascript:void(0);" onclick="SelectPay('免费');">免费</a> <a href="javascript:void(0);"
                                        onclick="SelectPay('付费');">付费</a>
                                </div>
                                <%= Html.Hidden("HidPayType") %>
                            </div>
                            <div id="DivSelectPay" style="display: none">
                                <div class="dropset">
                                    <div class="no_select">
                                        费用(元)：</div>
                                </div>
                                <div class="dropset">
                                    <div class="no_select input_in">
                                        <input class="add_input short_input no_input" name="Fee" type="text" value="选填" /></div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="event_editer">
                        <textarea name="Content" id="Content"></textarea>
                        <script type="text/javascript">
                            var fckContent = new FCKeditor('Content');
                            fckContent.Height = 300;
                            fckContent.Width = 700;
                            fckContent.ReplaceTextarea();
                        </script>
                    </div>
                    <div class="btn_line">
                        <input type="button" class="btn yahei" value="下一步" name=""></div>
                </div>
            </div>
        </div>
        <%= Html.Hidden("GroupId", ViewData["GroupId"]) %>
        <% } %>
    </div>
    <script type="text/javascript">
        var times = ["0:00", "0:30", "1:00", "1:30", "2:00", "2:30", "3:00", "3:30", "4:00", "4:30", "5:00", "5:30", "6:00", "6:30", "7:00", "7:30", "8:00", "8:30", "9:00", "9:30", "10:00", "10:30", "11:00", "11:30", "12:00", "12:30", "13:00", "13:30", "14:00", "14:30", "15:00", "15:30", "16:00", "16:30", "17:00", "17:30", "18:00", "18:30", "19:00", "19:30", "19:30", "20:00", "20:30", "21:00", "21:30", "22:00", "22:30", "23:00", "23:30", "24:00"];

        $("#LinkActiveMode").click(function () {
            if ($("#DivActiveMode").css("display") == "none") {
                $(".select_list").hide();
                $("#DivActiveMode").show();
            } else {
                $("#DivActiveMode").hide();
            }
        });

        $("#LinkFrequency").click(function () {
            if ($("#DivWeek").css("display") == "none") {
                $(".select_list").hide();
                $("#DivWeek").show();
            } else {
                $("#DivWeek").hide();
            }
        });

        $("#LinkStartTime").click(function () {
            if ($("#DivStartTime").css("display") == "none") {
                $(".select_list").hide();
                $("#DivStartTime").empty();
                for (var i = 0; i < times.length; i++) {
                    $("#DivStartTime").append("<a href=\"javascript:void(0);\" onclick=\"SelectTime(" + i + ", 'Start');\">" + times[i] + "</a> ");
                }
                $("#DivStartTime").show();
            } else {
                $("#DivStartTime").hide();
            }
        });

        $("#LinkEndTime").click(function () {
            if ($("#DivEndTime").css("display") == "none") {
                $(".select_list").hide();
                $("#DivEndTime").show();
            } else {
                $("#DivEndTime").hide();
            }
        });

        function SelectTime(index, type) {
            if (type == "Start") {
                $("#SpanStartTime").text(times[index]);
                $("#HidStartTime").val(times[index]);
                $("#DivEndTime").empty();
                for (var i = index + 1; i < times.length; i++) {
                    $("#DivEndTime").append("<a href=\"javascript:void(0);\" onclick=\"SelectTime(" + i + ", 'End');\">" + times[i] + "</a> ");
                }
            } else {
                $("#SpanEndTime").text(times[index]);
                $("#HidEndTime").val(times[index]);
            }
            $(".select_list").hide();
        }

        function SelectActiveMode(mode) {
            $("#DivActiveTime").hide();
            $("#DivStartAndEndTime").hide();
            $("#DivFrequency").hide();

            $("#ActiveMode").val(mode);
            $("#SpanActiveMode").text(mode);
            $("#DivActiveMode").hide();
            if (mode == "当天结束") {
                $("#DivActiveTime").show();
            } else if (mode == "连续多天") {
                $("#DivStartAndEndTime").show();
            } else if (mode == "每周举行") {
                $("#DivFrequency").show();
            }
        }

        $("#LinkCity").click(function () {
            if ($("#DivCity").css("display") == "none") {
                $(".select_list").hide();
                $("#DivCity").show();
            } else {
                $("#DivCity").hide();
            }
        });

        $("#LinkPay").click(function () {
            if ($("#DivPay").css("display") == "none") {
                $(".select_list").hide();
                $("#DivPay").show();
            } else {
                $("#DivPay").hide();
            }
        });

        function SelectPay(mode) {
            if (mode == "付费") {
                $("#DivSelectPay").show();
            } else {
                $("#DivSelectPay").hide();
            }
            $("#SpanPay").text(mode);
            $("#HidPayType").val(mode);
            $("#DivPay").hide();
        }

        $("[rel=LinkSports]").click(function () {
            $("[rel=LinkSports]").attr("class", "");
            $(this).attr("class", "current");
            $("#HidSportId").val($(this).attr("id"));
        });

        $(function () {
            $(document).bind("click", function (e) {
                var target = $(e.target);
                if (target.closest(".select_list").length == 0 && target.closest(".selected").length == 0) {
                    $(".select_list").hide();
                }
            })
        })
    </script>
</asp:Content>
